QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++17

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0


#获取 HALCONROOT 环境变量 (Windows 格式)
HALCONROOT = $$system(echo %HALCONROOT%)
# Halcon 包含路径和库路径
isEmpty(HALCONROOT): HALCONROOT = "C:/Program Files/MVTec/HALCON-22.11-Progress"
# 输出 HALCONROOT 以确认
message("HALCONROOT after check: $$HALCONROOT")
# 设置包含路径和库路径
INCLUDEPATH += $$HALCONROOT/include \
                $$HALCONROOT/include/halconcpp
LIBS += -L$$HALCONROOT/lib/x64-win64 \
        -lhalconcpp \
        -lhalcon \
        -lhalconxl




SOURCES += \
    main.cpp \
    mainwindow.cpp \
    qhalconwindow.cpp

HEADERS += \
    mainwindow.h \
    qhalconwindow.h

FORMS += \
    mainwindow.ui




# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
